import type { RouteRecordItem } from 'vc/src/router';
import { LAYOUT } from '@/router/constants';

export const LINK_BASE_FEAT = '/feat';

export const LINK_FEAT_USE_TAB = LINK_BASE_FEAT + '/useTab';
export const LINK_FEAT_USE_CONTEXT = LINK_BASE_FEAT + '/useContext';
export const LINK_FEAT_USE_NAMESPACE = LINK_BASE_FEAT + '/useNameSpace';
export const LINK_FEAT_USE_COMPONENT_TEST = LINK_BASE_FEAT + '/useComponentTest';


export const LINK_FEAT_DYNAMICTAB = LINK_BASE_FEAT + '/dynamicTab';

const feat: RouteRecordItem = {
  path: LINK_BASE_FEAT,
  name: 'FeatDemo',
  component: LAYOUT,
  meta: {
    orderNo: 19,
    icon: 'ion:git-compare-outline',
    title: '功能测试'
  },
  children: [
    {
      path: LINK_FEAT_USE_TAB,
      component: () => import('@/views/demo/feat/use-tab.vue'),
      meta: {
        title: 'useTab'
      }
    },
    {
      path: LINK_FEAT_USE_CONTEXT,
      component: () => import('@/views/demo/feat/use-context/index.vue'),
      meta: {
        title: 'useContext'
      }
    },
    {
      path: LINK_FEAT_USE_NAMESPACE,
      component: () => import('@/views/demo/feat/use-namespace.vue'),
      meta: {
        title: 'use-namespace'
      }
    },
    {
      path: LINK_FEAT_USE_COMPONENT_TEST,
      component: () => import('@/views/demo/feat/use-component-test.vue'),
      meta: {
        title: '组件测试',
        ignoreAuth: true
      }
    },
    {
      path: LINK_FEAT_DYNAMICTAB,
      component: () => import('@/views/demo/dynamicTab/index.vue'),
      meta: {
        title: '组合监控',
        hideSide: true
      }
    },
    {
      path: 'side-menu',
      component: () => import('@/views/demo/dynamicTab/side-menu.vue'),
      meta: {
        title: '侧边栏',
        hideSide: true
      }
    }
  ]
};

export default feat;
